<template>
    <div class="image-view">
        <ParamView label="图片宽度：" tip="40%" :mult="false" :word="width"  @word="onWidth"></ParamView>
        <div class="img-list">
            <div v-for="(item, index) in imgs" :style="{'width': width}" :key="index+item" class="img-item">
                <img class="img" :src="fullPath(item)"/>
            </div>
        </div>
    </div>
</template>
<script>
import ParamView from '../ParamView/index.vue'
export default {
    props: {
        imgs: Array,
        prefix: String,
    },
    components: {
        ParamView
    },
    data() {
        return {
            width: "40%"
        }
    },
    methods: {
        fullPath(str){
            return this.prefix + str;
        },
        onWidth(value) {
            this.width = value;
        },
    },
}
</script>

<style lang="less" scoped>
@import url(./index.less);
</style>